
package com.core.bean;

import com.core.dao.IOnlineDao;

/**
 *
 */
public class DoubleOnline extends Online {
    @Override
    public void login() throws Exception {
        IOnlineDao dao = getDao();
        Online online = dao.getByUserName(this.getUser().getName());
        if(online.getDevInfo().equals(this.getDevInfo())){
            dao.remove(online.getId());
        }
        dao.add(this);
    }

}